<template>
  <iframe :src="url" class="pd-container"></iframe>
</template>
  
  <script>
import { getAction } from '@api/manage'
import Vue from 'vue'
import { USER_INFO } from '@/store/mutation-types'
import { showZwtNav } from '@/utils/showNav.js'

export default {
  name: 'GdwyyAppPd',

  data() {
    return {}
  },

  created() {
    showZwtNav(this.$route.meta.title)
  },

  computed: {
    url() {
      // 获取联通公众app的直接token
      // 获取所有cookie,返回一个字符串
      let cookies = document.cookie
      // 117906869135825 陈玺栋的联通token
      if (!cookies)
        return `https://gdqd.10010.com:18091/WXX/static/build/index.html#/pages/promotionTask/task/index?token=117906869135825`
      let cookieArr = cookies.split(';'),
        sessionid = ''
      for (let i = 0; i < cookieArr.length; i++) {
        let pair = cookieArr[i].split('=')
        if (pair[0].trim() === 'sessionid') {
          sessionid = pair[1]
          break
        }
      }
      return `https://gdqd.10010.com:18091/WXX/static/build/index.html#/pages/promotionTask/task/index?token=${sessionid}`
    },
  },
}
</script>
  
  <style lang="less" scoped>
.pd-container {
  width: 100%;
  height: 100vh;
  overflow: auto;
}
</style>